package com.imc.core.config.constants;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * Created by tanweiping on 2018/7/22.
 */
/*
* 类描述：权限方面的配置对应的yml配置
* 开发者：tanweiping
* 创建日期：2018/8/7 09:59
*/
@Data
@Configuration
@ConfigurationProperties(prefix = "constants.auth")
public class AuthHttpCode {
    private MessageTuple SUCCESS;
    private MessageTuple ERROR;
    private MessageTuple UNAUTHORIZED;
    private MessageTuple FORBIDDEN;

    private MessageTuple INTERNAL_SERVER_ERROR;
    private MessageTuple BAD_REQUEST;
    private MessageTuple NEEDLOGIN;
    private MessageTuple LOGOUT;


    private MessageTuple ERRORPWD;
    private MessageTuple ERRORVERIFY;
    private MessageTuple NONEUSER;
    private MessageTuple ERROROLDPWD;
    private MessageTuple INVALIDUSER;
    private MessageTuple EXISTUSER;

    /*
    * 类描述：权限状态的元组类
    * 开发者：tanweiping
    * 创建日期：2018/8/7 10:16
    */
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class MessageTuple{
        private String code;
        private String message;
    }

}
